#rogue abilities file
from abilities.base import *
import random

class BlindStrike(MeleeAbility):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "blind strike"
	def calculateDamage(self):
		self.Dmg = (random.randint(15,20) + (self.Player.Agi / 1.50))
		self.CP += 1
		if self.CP > self.MaxCP:
			self.CP = self.MaxCP
		return self.Dmg
	
class Shank(MeleeAbility):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "shank"
	def calculateDamage(self):
		self.Dmg = (random.randint(5,15) + (self.Agi / 5.5))
		self.Dmg *= (self.CP)
		self.CP = 0
		return self.Dmg

class CheapShot(Ability):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "cheap shot"
	def calculateDamage(self):
		return 0
	def setCooldown(self):
		self.Cooldown=10
	def addStun(self,otherPlayer):
		#Stun needs to be based on the number of combo points the player has.
		otherPlayer.stun(self.CP)
		self.CP = 0
	
class QuickStrike(MeleeAbility):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "quick strike"
	def calculateDamage(self):
		self.Dmg = ((self.Player.Str + self.Player.Agi) / 2.1)
		# 30% chance to add 1 combo point
		if 30 >= random.randint(1,100):
			self.CP += 1
		return self.Dmg
	def addStun(self,otherPlayer):
		#---The spell has a 30% chance to stun the target for 1 turn
		self.ChanceStun = 30
		if self.ChanceStun >= random.randint(1,100):
			otherPlayer.stun(1)
		return 0

class OpenWound(DoT):
	def __init__(self,player):
		DoT.__init__(self,player)
		self.Name = "open wound"
	def calculateDamage(self):
		self.Dmg = (random.randint(5,7) + (self.Player.Agi / 5))
		return self.Dmg
	def statChange(self,otherPlayer):
		return
	def removeStatChange(self,otherPlayer):
		return
	def upfrontDamage(self,otherPlayer):
		return 0
	def setTime(self):
		return 8
		
class Aggression(Buff):
  def __init__(self,player):
    Buff.__init__(self,player)
    self.Name = "aggression"
  def setCooldown(self):
    self.Cooldown=0
  def statChange(self,otherPlayer):
    self.OrigPlayer.Str = self.Player.Str
	self.OrigPlayer.Agi = self.Player.Agi
	self.Player.Str += self.Player.Str * 1.25
	self.Player.Agi += self.Player.Agi * 1.25
  def removeStatChange(self,otherPlayer):
    self.Player.Str = self.OrigPlayer.Str
	self.Player.Agi = self.OrigPlayer.Agi
  def upfrontDamage(self,otherPlayer):
    return
  def setTime(self):
    return (self.CP)
	self.CP = 0
	
	
	
	
	
	
	
	
	
	
	
	
	